package com.heima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.heima.pojo.Sku;
import com.heima.pojo.vo.SkuVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface SkuMapper extends BaseMapper<Sku> {

    /**
     * 这是Mybatis Generator拓展插件生成的方法(请勿删除).
     * This method corresponds to the database table tb_sku
     *
     * @mbg.generated
     * @author hewei
     */
    int batchInsert(@Param("list") List<Sku> list);

    IPage<SkuVo> pageSearch(Page page, String skuName);

    List<Map<String, Object>> topSku(Integer topValue, LocalDateTime startTime, LocalDateTime endTime);
}